<!DESCRIPTION>If your site uses a frames setup, you probably do not want the containing pages to be accessed individually. This script ensures they are not. When put inside the page(s) in question, the script checks to see if it's inside a frame, and redirects users to the main frame page (so the page is viewed inside the frames context) if not.
<!/DESCRIPTION>
<!CATEGORY>windows, remotes, frames<!/CATEGORY>
<!SCRIPT>
<!-- START OF SCRIPT -->
<!--Directions: Just add the below code to the <HEAD> section of ALL the page(s) you wish to ensure are viewed only inside your frames setup: -->
<script>
//if not in frames
if (parent.frames.length==0)
//CHANGE "index.htm" to the URL of your main frame page
window.location.replace("index.htm")
</script>
<!-- END OF SCRIPT -->
<!/SCRIPT>
<!PREVIEW>
<!-- START OF SCRIPT -->
<!--Directions: Just add the below code to the <HEAD> section of ALL the page(s) you wish to ensure are viewed only inside your frames setup: -->
<script>
//if not in frames
if (parent.frames.length==0)
//CHANGE "index.htm" to the URL of your main frame page